<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<object ID='WebBrowser' WIDTH="0" HEIGHT="0" CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>
<OBJECT id=report1
classid="clsid:1D2775A5-C319-4FB4-A452-8FBB96DA37E4"
width=100%
align=center
height=100%
hspace=0
vspace=0
>
</OBJECT>
<title>Insert title here</title>
<style type="text/css" title="currentStyle">
			@import "css/demo_page.css";
			@import "css/demo_table.css";
		</style>

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/grider.js"></script>
<script type='text/javascript'
	src='/MyTestPro/dwr/interface/TestClass.js'></script>
<script type='text/javascript' src='/MyTestPro/dwr/engine.js'></script>

 <script type='text/javascript' src='/MyTestPro/dwr/util.js'></script>


<script type="text/javascript">	
report1.SetfrfFilePath('cccc');
	$(document).ready(function(){		
		TestClass.getResultByProject(function(data){			
			loadTable(data);
			$("#jTable").dataTable({
				//"bPaginate": false,
				//"bLengthChange": true,
				//"bFilter": false,
				//"bAutoWidth": false,
				"bSort": false, //disabled sorting.
				"sPaginationType": "full_numbers" //pages count style.
				//"aaSorting":[[ 2, "asc" ]] //order field.
			});
			$("#convTable").click(function(){
				$('#jTable').grider();
			});
		});				
	});
	function loadTable(para){		
		var cellFuncs = [
		                 function(data) { return data.projectnumber; },
		                 function(data) { return data.totalamount; }
		               ];
        dwr.util.addRows("projectList",para,cellFuncs);
	}
	function printPreview(){
		document.all.WebBrowser.ExecWB(7,1);
	}
</script>

</head>
<body>
<input type="button" value="Preview" onclick="printPreview();" />
<input id="convTable" type="button" value="Convert Table" />

<table id="jTable" class="display">
	<thead>
		<tr>
			<th>project</th>
			<th>amount</th>
		</tr>
	</thead>
	<tbody id="projectList">
		<tr id="pattern">
			<td></td>
			<td></td>
		</tr>

	</tbody>
</table>
</body>
</html>